package dropbox.common;

/**
 * this class represent a delete file/dir command
 * means a folder or a file was deleted on server
 * 
 * @author Yoav
 *
 */

public class DeleteCommand extends Command{

	private String path;

	/**
	 * d.cont
	 */
	public DeleteCommand() {
		super();
	}
	

	/**
	 * constructor
	 * @param path dir/file path
	 */
	public DeleteCommand(String path) {
		super();
		this.path = path;
	}

	/**
	 * use FileAction interface to delete a folder/file
	 */
	@Override
	public void execute() {
		getAction().deleteFile(path);
	}
	/**
	 * get dir/file path
	 * @return dir/file path
	 */
	public String getPath() {
		return path;
	}

	/**
	 * set dir/file path
	 * @param path dir/file path
	 */
	public void setPath(String path) {
		this.path = path;
	}
	

}
